#pragma once

#include "math/float4x4.h"
#include "rendermesh.h"
#include "animation.h"

struct rendernode_t
{
	float4x4				local_matrix;
	float4x4				world_matrix;
	uint32					hierarchy_sub_count;
	rendermesh_t*			mesh;
	stringhash				name;
	uint32					parent_index;

	rendernode_t() : parent_index(-1),hierarchy_sub_count(1), mesh(NULL)
	{
		local_matrix.identity();
	}

	bool operator==(const stringhash& name) const
	{
		return this->name==name;
	}

#ifdef LEO_DESIGNER
	void save(file_t&);
#endif
	void load(file_t&);
};


